/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ourGuestList;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author ron
 */
@Entity
@Table(name = "GUEST")
@NamedQueries({@NamedQuery(name = "Guest.findAll", query = "SELECT g FROM Guest g"), @NamedQuery(name = "Guest.findById", query = "SELECT g FROM Guest g WHERE g.id = :id"), @NamedQuery(name = "Guest.findByFirstname", query = "SELECT g FROM Guest g WHERE g.firstname = :firstname"), @NamedQuery(name = "Guest.findByLastname", query = "SELECT g FROM Guest g WHERE g.lastname = :lastname"), @NamedQuery(name = "Guest.findByDriverslicense", query = "SELECT g FROM Guest g WHERE g.driverslicense = :driverslicense"), @NamedQuery(name = "Guest.findByNumofguests", query = "SELECT g FROM Guest g WHERE g.numofguests = :numofguests")})
public class Guest implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "FIRSTNAME")
    private String firstname;
    @Column(name = "LASTNAME")
    private String lastname;
    @Column(name = "DRIVERSLICENSE")
    private String driverslicense;
    @Column(name = "NUMOFGUESTS")
    private Integer numofguests;

    public Guest() {
    }

    public Guest(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getDriverslicense() {
        return driverslicense;
    }

    public void setDriverslicense(String driverslicense) {
        this.driverslicense = driverslicense;
    }

    public Integer getNumofguests() {
        return numofguests;
    }

    public void setNumofguests(Integer numofguests) {
        this.numofguests = numofguests;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Guest)) {
            return false;
        }
        Guest other = (Guest) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ourGuestList.Guest[id=" + id + "]";
    }

}
